package com.fyb.basic.lock;

import java.util.concurrent.atomic.AtomicInteger;

/**
 * @Author：MR.FANG
 * @name：AtomicCounter
 * @Date：2025/7/2 下午1:59
 */
public class AtomicCounter {
    private static  AtomicInteger count = new AtomicInteger(0);

    public static void inc(){
        count.incrementAndGet();
    }

    public static int getCount() {
        return count.get();
    }

      public static void main(String[] args) {
            inc();

            System.out.println(getCount());
      }
}
